﻿Imports System

Namespace System.Workflow.Runtime
    Friend Class RuntimeEnvironment
        Implements IDisposable
        ' Methods
        Public Sub New(ByVal runtime As WorkflowRuntime)
            RuntimeEnvironment.workflowRuntime = runtime
        End Sub

        Private Sub System.IDisposable.Dispose() Implements IDisposable.Dispose
            RuntimeEnvironment.workflowRuntime = Nothing
        End Sub


        ' Properties
        Friend Shared ReadOnly Property CurrentRuntime As WorkflowRuntime
            Get
                Return RuntimeEnvironment.workflowRuntime
            End Get
        End Property


        ' Fields
        <ThreadStatic> _
        Private Shared workflowRuntime As WorkflowRuntime
    End Class
End Namespace

